package b.p.b;

import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.animation.Interpolator;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.l;
import androidx.recyclerview.widget.RecyclerView.m;
import androidx.recyclerview.widget.RecyclerView.n;
import androidx.recyclerview.widget.RecyclerView.p;
import androidx.recyclerview.widget.RecyclerView.w;
import androidx.recyclerview.widget.RecyclerView.z;
import b.i.k.o;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.WeakHashMap;

/* compiled from: ItemTouchHelper */
public class q extends l implements n {
    public final p A = new b();
    public Rect B;
    public long C;
    public final List<View> a = new ArrayList();
    public final float[] b = new float[2];
    public z c = null;
    public float d;
    public float e;
    public float f;
    public float g;
    public float h;
    public float i;
    public float j;
    public float k;
    public int l = -1;
    public d m;
    public int n = 0;
    public int o;
    public List<f> p = new ArrayList();
    public int q;
    public RecyclerView r;
    public final Runnable s = new a();
    public VelocityTracker t;
    public List<z> u;
    public List<Integer> v;
    public View w = null;
    public int x = -1;
    public b.i.k.d y;
    public e z;

    /* compiled from: ItemTouchHelper */
    public class a implements Runnable {
        /* JADX WARNING: Removed duplicated region for block: B:35:0x00cb  */
        /* JADX WARNING: Removed duplicated region for block: B:39:0x00ff  */
        /* JADX WARNING: Removed duplicated region for block: B:38:0x00e4  */
        /* JADX WARNING: Removed duplicated region for block: B:45:0x010e  */
        /* JADX WARNING: Removed duplicated region for block: B:25:0x0088  */
        /* JADX WARNING: Removed duplicated region for block: B:35:0x00cb  */
        /* JADX WARNING: Removed duplicated region for block: B:38:0x00e4  */
        /* JADX WARNING: Removed duplicated region for block: B:39:0x00ff  */
        /* JADX WARNING: Removed duplicated region for block: B:41:0x0102 A:{SKIP} */
        /* JADX WARNING: Removed duplicated region for block: B:45:0x010e  */
        /* JADX WARNING: Missing block: B:20:0x007d, code skipped:
            if (r12 > 0) goto L_0x007f;
     */
        /* JADX WARNING: Missing block: B:31:0x00c4, code skipped:
            if (r10 > 0) goto L_0x00c6;
     */
        public void run() {
            /*
            r16 = this;
            r0 = r16;
            r1 = b.p.b.q.this;
            r2 = r1.c;
            if (r2 == 0) goto L_0x0133;
        L_0x0008:
            r3 = -9223372036854775808;
            r5 = 0;
            if (r2 != 0) goto L_0x0011;
        L_0x000d:
            r1.C = r3;
            goto L_0x0116;
        L_0x0011:
            r6 = java.lang.System.currentTimeMillis();
            r8 = r1.C;
            r2 = (r8 > r3 ? 1 : (r8 == r3 ? 0 : -1));
            if (r2 != 0) goto L_0x001e;
        L_0x001b:
            r8 = 0;
            goto L_0x0020;
        L_0x001e:
            r8 = r6 - r8;
        L_0x0020:
            r2 = r1.r;
            r2 = r2.getLayoutManager();
            r10 = r1.B;
            if (r10 != 0) goto L_0x0031;
        L_0x002a:
            r10 = new android.graphics.Rect;
            r10.<init>();
            r1.B = r10;
        L_0x0031:
            r10 = r1.c;
            r10 = r10.a;
            r11 = r1.B;
            r2.f(r10, r11);
            r10 = r2.g();
            r11 = 0;
            if (r10 == 0) goto L_0x0081;
        L_0x0041:
            r10 = r1.j;
            r12 = r1.h;
            r10 = r10 + r12;
            r10 = (int) r10;
            r12 = r1.B;
            r12 = r12.left;
            r12 = r10 - r12;
            r13 = r1.r;
            r13 = r13.getPaddingLeft();
            r12 = r12 - r13;
            r13 = r1.h;
            r14 = (r13 > r11 ? 1 : (r13 == r11 ? 0 : -1));
            if (r14 >= 0) goto L_0x005d;
        L_0x005a:
            if (r12 >= 0) goto L_0x005d;
        L_0x005c:
            goto L_0x007f;
        L_0x005d:
            r12 = (r13 > r11 ? 1 : (r13 == r11 ? 0 : -1));
            if (r12 <= 0) goto L_0x0081;
        L_0x0061:
            r12 = r1.c;
            r12 = r12.a;
            r12 = r12.getWidth();
            r12 = r12 + r10;
            r10 = r1.B;
            r10 = r10.right;
            r12 = r12 + r10;
            r10 = r1.r;
            r10 = r10.getWidth();
            r13 = r1.r;
            r13 = r13.getPaddingRight();
            r10 = r10 - r13;
            r12 = r12 - r10;
            if (r12 <= 0) goto L_0x0081;
        L_0x007f:
            r13 = r12;
            goto L_0x0082;
        L_0x0081:
            r13 = 0;
        L_0x0082:
            r2 = r2.h();
            if (r2 == 0) goto L_0x00c8;
        L_0x0088:
            r2 = r1.k;
            r10 = r1.i;
            r2 = r2 + r10;
            r2 = (int) r2;
            r10 = r1.B;
            r10 = r10.top;
            r10 = r2 - r10;
            r12 = r1.r;
            r12 = r12.getPaddingTop();
            r10 = r10 - r12;
            r12 = r1.i;
            r14 = (r12 > r11 ? 1 : (r12 == r11 ? 0 : -1));
            if (r14 >= 0) goto L_0x00a4;
        L_0x00a1:
            if (r10 >= 0) goto L_0x00a4;
        L_0x00a3:
            goto L_0x00c6;
        L_0x00a4:
            r10 = (r12 > r11 ? 1 : (r12 == r11 ? 0 : -1));
            if (r10 <= 0) goto L_0x00c8;
        L_0x00a8:
            r10 = r1.c;
            r10 = r10.a;
            r10 = r10.getHeight();
            r10 = r10 + r2;
            r2 = r1.B;
            r2 = r2.bottom;
            r10 = r10 + r2;
            r2 = r1.r;
            r2 = r2.getHeight();
            r11 = r1.r;
            r11 = r11.getPaddingBottom();
            r2 = r2 - r11;
            r10 = r10 - r2;
            if (r10 <= 0) goto L_0x00c8;
        L_0x00c6:
            r2 = r10;
            goto L_0x00c9;
        L_0x00c8:
            r2 = 0;
        L_0x00c9:
            if (r13 == 0) goto L_0x00e1;
        L_0x00cb:
            r10 = r1.m;
            r11 = r1.r;
            r12 = r1.c;
            r12 = r12.a;
            r12 = r12.getWidth();
            r14 = r1.r;
            r14.getWidth();
            r14 = r8;
            r13 = r10.e(r11, r12, r13, r14);
        L_0x00e1:
            r14 = r13;
            if (r2 == 0) goto L_0x00ff;
        L_0x00e4:
            r10 = r1.m;
            r11 = r1.r;
            r12 = r1.c;
            r12 = r12.a;
            r12 = r12.getHeight();
            r13 = r1.r;
            r13.getHeight();
            r13 = r2;
            r2 = r14;
            r14 = r8;
            r8 = r10.e(r11, r12, r13, r14);
            r13 = r2;
            r2 = r8;
            goto L_0x0100;
        L_0x00ff:
            r13 = r14;
        L_0x0100:
            if (r13 != 0) goto L_0x0108;
        L_0x0102:
            if (r2 == 0) goto L_0x0105;
        L_0x0104:
            goto L_0x0108;
        L_0x0105:
            r1.C = r3;
            goto L_0x0116;
        L_0x0108:
            r8 = r1.C;
            r5 = (r8 > r3 ? 1 : (r8 == r3 ? 0 : -1));
            if (r5 != 0) goto L_0x0110;
        L_0x010e:
            r1.C = r6;
        L_0x0110:
            r1 = r1.r;
            r1.scrollBy(r13, r2);
            r5 = 1;
        L_0x0116:
            if (r5 == 0) goto L_0x0133;
        L_0x0118:
            r1 = b.p.b.q.this;
            r2 = r1.c;
            if (r2 == 0) goto L_0x0121;
        L_0x011e:
            r1.p(r2);
        L_0x0121:
            r1 = b.p.b.q.this;
            r2 = r1.r;
            r1 = r1.s;
            r2.removeCallbacks(r1);
            r1 = b.p.b.q.this;
            r1 = r1.r;
            r2 = b.i.k.o.a;
            r1.postOnAnimation(r0);
        L_0x0133:
            return;
            */
            throw new UnsupportedOperationException("Method not decompiled: b.p.b.q$a.run():void");
        }
    }

    /* compiled from: ItemTouchHelper */
    public static abstract class d {
        public static final Interpolator b = new a();
        public static final Interpolator c = new b();
        public int a = -1;

        /* compiled from: ItemTouchHelper */
        public static class a implements Interpolator {
            public float getInterpolation(float f) {
                return (((f * f) * f) * f) * f;
            }
        }

        /* compiled from: ItemTouchHelper */
        public static class b implements Interpolator {
            public float getInterpolation(float f) {
                f -= 1.0f;
                return ((((f * f) * f) * f) * f) + 1.0f;
            }
        }

        public static int c(int i, int i2) {
            int i3 = i & 789516;
            if (i3 == 0) {
                return i;
            }
            i &= ~i3;
            if (i2 == 0) {
                i2 = i3 << 2;
            } else {
                i2 = i3 << 1;
                i |= -789517 & i2;
                i2 = (i2 & 789516) << 2;
            }
            return i | i2;
        }

        public abstract void a(RecyclerView recyclerView, z zVar);

        public int b(int i, int i2) {
            int i3 = i & 3158064;
            if (i3 == 0) {
                return i;
            }
            i &= ~i3;
            if (i2 == 0) {
                i2 = i3 >> 2;
            } else {
                i2 = i3 >> 1;
                i |= -3158065 & i2;
                i2 = (i2 & 3158064) >> 2;
            }
            return i | i2;
        }

        public final int d(RecyclerView recyclerView, z zVar) {
            WeakHashMap weakHashMap = o.a;
            return b(196611, recyclerView.getLayoutDirection());
        }

        public int e(RecyclerView recyclerView, int i, int i2, long j) {
            int i3 = -1;
            if (this.a == -1) {
                this.a = recyclerView.getResources().getDimensionPixelSize(2131165334);
            }
            int i4 = this.a;
            float f = 1.0f;
            float min = Math.min(1.0f, (((float) Math.abs(i2)) * 1.0f) / ((float) i)) - 1.0f;
            i4 = (int) (((float) (((int) Math.signum((float) i2)) * i4)) * (((((min * min) * min) * min) * min) + 1.0f));
            if (j <= 2000) {
                f = ((float) j) / 2000.0f;
            }
            i4 = (int) (((float) i4) * ((((f * f) * f) * f) * f));
            if (i4 != 0) {
                return i4;
            }
            if (i2 > 0) {
                i3 = 1;
            }
            return i3;
        }

        public void f(Canvas canvas, RecyclerView recyclerView, z zVar, float f, float f2, int i, boolean z) {
            View view = zVar.a;
            if (z && view.getTag(2131296647) == null) {
                WeakHashMap weakHashMap = o.a;
                Float valueOf = Float.valueOf(view.getElevation());
                int childCount = recyclerView.getChildCount();
                float f3 = 0.0f;
                for (int i2 = 0; i2 < childCount; i2++) {
                    View childAt = recyclerView.getChildAt(i2);
                    if (childAt != view) {
                        WeakHashMap weakHashMap2 = o.a;
                        float elevation = childAt.getElevation();
                        if (elevation > f3) {
                            f3 = elevation;
                        }
                    }
                }
                view.setElevation(f3 + 1.0f);
                view.setTag(2131296647, valueOf);
            }
            view.setTranslationX(f);
            view.setTranslationY(f2);
        }
    }

    /* compiled from: ItemTouchHelper */
    public class e extends SimpleOnGestureListener {
        public boolean a = true;

        public boolean onDown(MotionEvent motionEvent) {
            return true;
        }

        public void onLongPress(MotionEvent motionEvent) {
            if (this.a) {
                View m = q.this.m(motionEvent);
                if (m != null) {
                    z K = q.this.r.K(m);
                    if (K != null) {
                        q qVar = q.this;
                        if (((qVar.m.d(qVar.r, K) & 16711680) != 0 ? 1 : null) != null) {
                            int pointerId = motionEvent.getPointerId(0);
                            int i = q.this.l;
                            if (pointerId == i) {
                                pointerId = motionEvent.findPointerIndex(i);
                                float x = motionEvent.getX(pointerId);
                                float y = motionEvent.getY(pointerId);
                                qVar = q.this;
                                qVar.d = x;
                                qVar.e = y;
                                qVar.i = 0.0f;
                                qVar.h = 0.0f;
                                Objects.requireNonNull(qVar.m);
                                q.this.r(K, 2);
                            }
                        }
                    }
                }
            }
        }
    }

    /* compiled from: ItemTouchHelper */
    public static class f implements AnimatorListener {
        public final float a;
        public final float b;
        public final float c;
        public final float d;
        public final z e;
        public final int f;
        public final ValueAnimator g;
        public boolean h;
        public float i;
        public float j;
        public boolean k = false;
        public boolean l = false;
        public float m;

        /* compiled from: ItemTouchHelper */
        public class a implements AnimatorUpdateListener {
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                f.this.m = valueAnimator.getAnimatedFraction();
            }
        }

        public f(z zVar, int i, int i2, float f, float f2, float f3, float f4) {
            this.f = i2;
            this.e = zVar;
            this.a = f;
            this.b = f2;
            this.c = f3;
            this.d = f4;
            ValueAnimator ofFloat = ValueAnimator.ofFloat(new float[]{0.0f, 1.0f});
            this.g = ofFloat;
            ofFloat.addUpdateListener(new a());
            ofFloat.setTarget(zVar.a);
            ofFloat.addListener(this);
            this.m = 0.0f;
        }

        public void onAnimationCancel(Animator animator) {
            this.m = 1.0f;
        }

        public void onAnimationEnd(Animator animator) {
            if (!this.l) {
                this.e.t(true);
            }
            this.l = true;
        }

        public void onAnimationRepeat(Animator animator) {
        }

        public void onAnimationStart(Animator animator) {
        }
    }

    /* compiled from: ItemTouchHelper */
    public interface g {
        void b(View view, View view2, int i, int i2);
    }

    /* compiled from: ItemTouchHelper */
    public class b implements p {
        public boolean a(RecyclerView recyclerView, MotionEvent motionEvent) {
            ((b.i.k.d.b) q.this.y.a).a.onTouchEvent(motionEvent);
            int actionMasked = motionEvent.getActionMasked();
            f fVar = null;
            q qVar;
            if (actionMasked == 0) {
                q.this.l = motionEvent.getPointerId(0);
                q.this.d = motionEvent.getX();
                q.this.e = motionEvent.getY();
                qVar = q.this;
                VelocityTracker velocityTracker = qVar.t;
                if (velocityTracker != null) {
                    velocityTracker.recycle();
                }
                qVar.t = VelocityTracker.obtain();
                qVar = q.this;
                if (qVar.c == null) {
                    if (!qVar.p.isEmpty()) {
                        View m = qVar.m(motionEvent);
                        for (int size = qVar.p.size() - 1; size >= 0; size--) {
                            f fVar2 = (f) qVar.p.get(size);
                            if (fVar2.e.a == m) {
                                fVar = fVar2;
                                break;
                            }
                        }
                    }
                    if (fVar != null) {
                        qVar = q.this;
                        qVar.d -= fVar.i;
                        qVar.e -= fVar.j;
                        qVar.l(fVar.e, true);
                        if (q.this.a.remove(fVar.e.a)) {
                            qVar = q.this;
                            qVar.m.a(qVar.r, fVar.e);
                        }
                        q.this.r(fVar.e, fVar.f);
                        qVar = q.this;
                        qVar.s(motionEvent, qVar.o, 0);
                    }
                }
            } else if (actionMasked == 3 || actionMasked == 1) {
                qVar = q.this;
                qVar.l = -1;
                qVar.r(null, 0);
            } else {
                int i = q.this.l;
                if (i != -1) {
                    int findPointerIndex = motionEvent.findPointerIndex(i);
                    if (findPointerIndex >= 0) {
                        q.this.j(actionMasked, motionEvent, findPointerIndex);
                    }
                }
            }
            VelocityTracker velocityTracker2 = q.this.t;
            if (velocityTracker2 != null) {
                velocityTracker2.addMovement(motionEvent);
            }
            if (q.this.c != null) {
                return true;
            }
            return false;
        }

        public void c(RecyclerView recyclerView, MotionEvent motionEvent) {
            ((b.i.k.d.b) q.this.y.a).a.onTouchEvent(motionEvent);
            VelocityTracker velocityTracker = q.this.t;
            if (velocityTracker != null) {
                velocityTracker.addMovement(motionEvent);
            }
            if (q.this.l != -1) {
                int actionMasked = motionEvent.getActionMasked();
                int findPointerIndex = motionEvent.findPointerIndex(q.this.l);
                if (findPointerIndex >= 0) {
                    q.this.j(actionMasked, motionEvent, findPointerIndex);
                }
                q qVar = q.this;
                z zVar = qVar.c;
                if (zVar != null) {
                    int i = 0;
                    if (actionMasked != 1) {
                        if (actionMasked != 2) {
                            if (actionMasked == 3) {
                                velocityTracker = qVar.t;
                                if (velocityTracker != null) {
                                    velocityTracker.clear();
                                }
                            } else if (actionMasked == 6) {
                                actionMasked = motionEvent.getActionIndex();
                                int pointerId = motionEvent.getPointerId(actionMasked);
                                q qVar2 = q.this;
                                if (pointerId == qVar2.l) {
                                    if (actionMasked == 0) {
                                        i = 1;
                                    }
                                    qVar2.l = motionEvent.getPointerId(i);
                                    q qVar3 = q.this;
                                    qVar3.s(motionEvent, qVar3.o, actionMasked);
                                }
                            }
                        } else if (findPointerIndex >= 0) {
                            qVar.s(motionEvent, qVar.o, findPointerIndex);
                            q.this.p(zVar);
                            q qVar4 = q.this;
                            qVar4.r.removeCallbacks(qVar4.s);
                            q.this.s.run();
                            q.this.r.invalidate();
                        }
                    }
                    q.this.r(null, 0);
                    q.this.l = -1;
                }
            }
        }

        public void e(boolean z) {
            if (z) {
                q.this.r(null, 0);
            }
        }
    }

    /* compiled from: ItemTouchHelper */
    public class c extends f {
        public final /* synthetic */ int n;
        public final /* synthetic */ z o;
        public final /* synthetic */ q p;

        public c(q qVar, z zVar, int i, int i2, float f, float f2, float f3, float f4, int i3, z zVar2) {
            this.p = qVar;
            this.n = i3;
            this.o = zVar2;
            super(zVar, i, i2, f, f2, f3, f4);
        }

        public void onAnimationEnd(Animator animator) {
            if (!this.l) {
                this.e.t(true);
            }
            this.l = true;
            if (!this.k) {
                q qVar;
                if (this.n <= 0) {
                    qVar = this.p;
                    qVar.m.a(qVar.r, this.o);
                } else {
                    this.p.a.add(this.o.a);
                    this.h = true;
                    int i = this.n;
                    if (i > 0) {
                        q qVar2 = this.p;
                        qVar2.r.post(new r(qVar2, this, i));
                    }
                }
                qVar = this.p;
                View view = qVar.w;
                View view2 = this.o.a;
                if (view == view2) {
                    qVar.q(view2);
                }
            }
        }
    }

    public q(d dVar) {
        this.m = dVar;
    }

    public static boolean o(View view, float f, float f2, float f3, float f4) {
        return f >= f3 && f <= f3 + ((float) view.getWidth()) && f2 >= f4 && f2 <= f4 + ((float) view.getHeight());
    }

    public void b(View view) {
    }

    public void d(View view) {
        q(view);
        z K = this.r.K(view);
        if (K != null) {
            z zVar = this.c;
            if (zVar == null || K != zVar) {
                l(K, false);
                if (this.a.remove(K.a)) {
                    this.m.a(this.r, K);
                }
            } else {
                r(null, 0);
            }
        }
    }

    public void f(Rect rect, View view, RecyclerView recyclerView, w wVar) {
        rect.setEmpty();
    }

    public void g(Canvas canvas, RecyclerView recyclerView, w wVar) {
        float f;
        float f2;
        float f3;
        Canvas canvas2 = canvas;
        this.x = -1;
        if (this.c != null) {
            n(this.b);
            float[] fArr = this.b;
            f = fArr[0];
            f2 = fArr[1];
            f3 = f;
        } else {
            f3 = 0.0f;
            f2 = 0.0f;
        }
        d dVar = this.m;
        z zVar = this.c;
        List list = this.p;
        int i = this.n;
        Objects.requireNonNull(dVar);
        int size = list.size();
        int i2 = 0;
        while (i2 < size) {
            f fVar = (f) list.get(i2);
            f = fVar.a;
            float f4 = fVar.c;
            if (f == f4) {
                fVar.i = fVar.e.a.getTranslationX();
            } else {
                fVar.i = c.b.a.a.a.a(f4, f, fVar.m, f);
            }
            f = fVar.b;
            f4 = fVar.d;
            if (f == f4) {
                fVar.j = fVar.e.a.getTranslationY();
            } else {
                fVar.j = c.b.a.a.a.a(f4, f, fVar.m, f);
            }
            int save = canvas.save();
            z zVar2 = fVar.e;
            float f5 = fVar.i;
            f4 = fVar.j;
            int i3 = save;
            float f6 = f4;
            int i4 = i2;
            i2 = fVar.f;
            int i5 = size;
            dVar.f(canvas, recyclerView, zVar2, f5, f6, i2, false);
            canvas2.restoreToCount(i3);
            i2 = i4 + 1;
            size = i5;
        }
        if (zVar != null) {
            int save2 = canvas.save();
            dVar.f(canvas, recyclerView, zVar, f3, f2, i, true);
            canvas2.restoreToCount(save2);
        }
    }

    public void h(Canvas canvas, RecyclerView recyclerView, w wVar) {
        int i = 0;
        if (this.c != null) {
            n(this.b);
            float[] fArr = this.b;
            float f = fArr[0];
            float f2 = fArr[1];
        }
        d dVar = this.m;
        z zVar = this.c;
        List list = this.p;
        Objects.requireNonNull(dVar);
        int size = list.size();
        for (int i2 = 0; i2 < size; i2++) {
            f fVar = (f) list.get(i2);
            int save = canvas.save();
            View view = fVar.e.a;
            canvas.restoreToCount(save);
        }
        if (zVar != null) {
            canvas.restoreToCount(canvas.save());
        }
        for (size--; size >= 0; size--) {
            f fVar2 = (f) list.get(size);
            boolean z = fVar2.l;
            if (z && !fVar2.h) {
                list.remove(size);
            } else if (!z) {
                i = 1;
            }
        }
        if (i != 0) {
            recyclerView.invalidate();
        }
    }

    public final int i(z zVar, int i) {
        if ((i & 12) != 0) {
            float abs;
            int i2 = 4;
            int i3 = this.h > 0.0f ? 8 : 4;
            VelocityTracker velocityTracker = this.t;
            if (velocityTracker != null && this.l > -1) {
                d dVar = this.m;
                float f = this.g;
                Objects.requireNonNull(dVar);
                velocityTracker.computeCurrentVelocity(1000, f);
                float xVelocity = this.t.getXVelocity(this.l);
                float yVelocity = this.t.getYVelocity(this.l);
                if (xVelocity > 0.0f) {
                    i2 = 8;
                }
                abs = Math.abs(xVelocity);
                if ((i2 & i) != 0 && i3 == i2) {
                    d dVar2 = this.m;
                    xVelocity = this.f;
                    Objects.requireNonNull(dVar2);
                    if (abs >= xVelocity && abs > Math.abs(yVelocity)) {
                        return i2;
                    }
                }
            }
            abs = (float) this.r.getWidth();
            Objects.requireNonNull(this.m);
            abs *= 0.5f;
            if ((i & i3) != 0 && Math.abs(this.h) > abs) {
                return i3;
            }
        }
        return 0;
    }

    public void j(int i, MotionEvent motionEvent, int i2) {
        if (this.c == null && i == 2 && this.n != 2) {
            Objects.requireNonNull(this.m);
            if (this.r.getScrollState() != 1) {
                float x;
                float y;
                float f;
                m layoutManager = this.r.getLayoutManager();
                int i3 = this.l;
                z zVar = null;
                if (i3 != -1) {
                    i3 = motionEvent.findPointerIndex(i3);
                    x = motionEvent.getX(i3) - this.d;
                    y = motionEvent.getY(i3) - this.e;
                    x = Math.abs(x);
                    y = Math.abs(y);
                    f = (float) this.q;
                    if ((x >= f || y >= f) && ((x <= y || !layoutManager.g()) && (y <= x || !layoutManager.h()))) {
                        View m = m(motionEvent);
                        if (m != null) {
                            zVar = this.r.K(m);
                        }
                    }
                }
                if (zVar != null) {
                    i = (this.m.d(this.r, zVar) & 65280) >> 8;
                    if (i != 0) {
                        y = motionEvent.getX(i2);
                        y -= this.d;
                        float y2 = motionEvent.getY(i2) - this.e;
                        x = Math.abs(y);
                        f = Math.abs(y2);
                        float f2 = (float) this.q;
                        if (x >= f2 || f >= f2) {
                            if (x > f) {
                                if (y < 0.0f && (i & 4) == 0) {
                                    return;
                                }
                                if (y > 0.0f && (i & 8) == 0) {
                                    return;
                                }
                            } else if (y2 < 0.0f && (i & 1) == 0) {
                                return;
                            } else {
                                if (y2 > 0.0f && (i & 2) == 0) {
                                    return;
                                }
                            }
                            this.i = 0.0f;
                            this.h = 0.0f;
                            this.l = motionEvent.getPointerId(0);
                            r(zVar, 1);
                        }
                    }
                }
            }
        }
    }

    public final int k(z zVar, int i) {
        if ((i & 3) != 0) {
            float abs;
            int i2 = 1;
            int i3 = this.i > 0.0f ? 2 : 1;
            VelocityTracker velocityTracker = this.t;
            if (velocityTracker != null && this.l > -1) {
                d dVar = this.m;
                float f = this.g;
                Objects.requireNonNull(dVar);
                velocityTracker.computeCurrentVelocity(1000, f);
                float xVelocity = this.t.getXVelocity(this.l);
                float yVelocity = this.t.getYVelocity(this.l);
                if (yVelocity > 0.0f) {
                    i2 = 2;
                }
                abs = Math.abs(yVelocity);
                if ((i2 & i) != 0 && i2 == i3) {
                    d dVar2 = this.m;
                    yVelocity = this.f;
                    Objects.requireNonNull(dVar2);
                    if (abs >= yVelocity && abs > Math.abs(xVelocity)) {
                        return i2;
                    }
                }
            }
            abs = (float) this.r.getHeight();
            Objects.requireNonNull(this.m);
            abs *= 0.5f;
            if ((i & i3) != 0 && Math.abs(this.i) > abs) {
                return i3;
            }
        }
        return 0;
    }

    public void l(z zVar, boolean z) {
        for (int size = this.p.size() - 1; size >= 0; size--) {
            f fVar = (f) this.p.get(size);
            if (fVar.e == zVar) {
                fVar.k |= z;
                if (!fVar.l) {
                    fVar.g.cancel();
                }
                this.p.remove(size);
                return;
            }
        }
    }

    public View m(MotionEvent motionEvent) {
        View view;
        float x = motionEvent.getX();
        float y = motionEvent.getY();
        z zVar = this.c;
        if (zVar != null) {
            View view2 = zVar.a;
            if (o(view2, x, y, this.j + this.h, this.k + this.i)) {
                return view2;
            }
        }
        for (int size = this.p.size() - 1; size >= 0; size--) {
            f fVar = (f) this.p.get(size);
            view = fVar.e.a;
            if (o(view, x, y, fVar.i, fVar.j)) {
                return view;
            }
        }
        RecyclerView recyclerView = this.r;
        int e = recyclerView.e.e();
        while (true) {
            e--;
            if (e < 0) {
                view = null;
                break;
            }
            view = recyclerView.e.d(e);
            float translationX = view.getTranslationX();
            float translationY = view.getTranslationY();
            if (x >= ((float) view.getLeft()) + translationX && x <= ((float) view.getRight()) + translationX && y >= ((float) view.getTop()) + translationY && y <= ((float) view.getBottom()) + translationY) {
                break;
            }
        }
        return view;
    }

    public final void n(float[] fArr) {
        if ((this.o & 12) != 0) {
            fArr[0] = (this.j + this.h) - ((float) this.c.a.getLeft());
        } else {
            fArr[0] = this.c.a.getTranslationX();
        }
        if ((this.o & 3) != 0) {
            fArr[1] = (this.k + this.i) - ((float) this.c.a.getTop());
        } else {
            fArr[1] = this.c.a.getTranslationY();
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:51:0x01b2  */
    /* JADX WARNING: Removed duplicated region for block: B:59:0x01d3  */
    /* JADX WARNING: Removed duplicated region for block: B:116:0x0213 A:{SYNTHETIC} */
    /* JADX WARNING: Removed duplicated region for block: B:67:0x01f4  */
    public void p(androidx.recyclerview.widget.RecyclerView.z r22) {
        /*
        r21 = this;
        r0 = r21;
        r1 = r22;
        r2 = r0.r;
        r2 = r2.isLayoutRequested();
        if (r2 == 0) goto L_0x000d;
    L_0x000c:
        return;
    L_0x000d:
        r2 = r0.n;
        r3 = 2;
        if (r2 == r3) goto L_0x0013;
    L_0x0012:
        return;
    L_0x0013:
        r2 = r0.m;
        java.util.Objects.requireNonNull(r2);
        r2 = 1056964608; // 0x3f000000 float:0.5 double:5.222099017E-315;
        r4 = r0.j;
        r5 = r0.h;
        r4 = r4 + r5;
        r4 = (int) r4;
        r5 = r0.k;
        r6 = r0.i;
        r5 = r5 + r6;
        r5 = (int) r5;
        r6 = r1.a;
        r6 = r6.getTop();
        r6 = r5 - r6;
        r6 = java.lang.Math.abs(r6);
        r6 = (float) r6;
        r7 = r1.a;
        r7 = r7.getHeight();
        r7 = (float) r7;
        r7 = r7 * r2;
        r6 = (r6 > r7 ? 1 : (r6 == r7 ? 0 : -1));
        if (r6 >= 0) goto L_0x005b;
    L_0x0040:
        r6 = r1.a;
        r6 = r6.getLeft();
        r6 = r4 - r6;
        r6 = java.lang.Math.abs(r6);
        r6 = (float) r6;
        r7 = r1.a;
        r7 = r7.getWidth();
        r7 = (float) r7;
        r7 = r7 * r2;
        r2 = (r6 > r7 ? 1 : (r6 == r7 ? 0 : -1));
        if (r2 >= 0) goto L_0x005b;
    L_0x005a:
        return;
    L_0x005b:
        r2 = r0.u;
        if (r2 != 0) goto L_0x006e;
    L_0x005f:
        r2 = new java.util.ArrayList;
        r2.<init>();
        r0.u = r2;
        r2 = new java.util.ArrayList;
        r2.<init>();
        r0.v = r2;
        goto L_0x0076;
    L_0x006e:
        r2.clear();
        r2 = r0.v;
        r2.clear();
    L_0x0076:
        r2 = r0.m;
        java.util.Objects.requireNonNull(r2);
        r2 = r0.j;
        r6 = r0.h;
        r2 = r2 + r6;
        r2 = java.lang.Math.round(r2);
        r6 = 0;
        r2 = r2 - r6;
        r7 = r0.k;
        r8 = r0.i;
        r7 = r7 + r8;
        r7 = java.lang.Math.round(r7);
        r7 = r7 - r6;
        r8 = r1.a;
        r8 = r8.getWidth();
        r8 = r8 + r2;
        r8 = r8 + r6;
        r9 = r1.a;
        r9 = r9.getHeight();
        r9 = r9 + r7;
        r9 = r9 + r6;
        r10 = r2 + r8;
        r10 = r10 / r3;
        r11 = r7 + r9;
        r11 = r11 / r3;
        r12 = r0.r;
        r12 = r12.getLayoutManager();
        r13 = r12.A();
        r14 = 0;
    L_0x00b1:
        if (r14 >= r13) goto L_0x014d;
    L_0x00b3:
        r15 = r12.z(r14);
        r6 = r1.a;
        if (r15 != r6) goto L_0x00bd;
    L_0x00bb:
        goto L_0x013f;
    L_0x00bd:
        r6 = r15.getBottom();
        if (r6 < r7) goto L_0x013f;
    L_0x00c3:
        r6 = r15.getTop();
        if (r6 > r9) goto L_0x013f;
    L_0x00c9:
        r6 = r15.getRight();
        if (r6 < r2) goto L_0x013f;
    L_0x00cf:
        r6 = r15.getLeft();
        if (r6 <= r8) goto L_0x00d6;
    L_0x00d5:
        goto L_0x013f;
    L_0x00d6:
        r6 = r0.r;
        r6 = r6.K(r15);
        r3 = r0.m;
        java.util.Objects.requireNonNull(r3);
        r3 = r15.getLeft();
        r18 = r15.getRight();
        r18 = r18 + r3;
        r3 = 2;
        r18 = r18 / 2;
        r17 = r10 - r18;
        r17 = java.lang.Math.abs(r17);
        r18 = r15.getTop();
        r15 = r15.getBottom();
        r15 = r15 + r18;
        r15 = r15 / r3;
        r15 = r11 - r15;
        r15 = java.lang.Math.abs(r15);
        r17 = r17 * r17;
        r15 = r15 * r15;
        r15 = r15 + r17;
        r3 = r0.u;
        r3 = r3.size();
        r18 = r2;
        r19 = r7;
        r2 = 0;
        r7 = 0;
    L_0x0117:
        if (r2 >= r3) goto L_0x0130;
    L_0x0119:
        r20 = r3;
        r3 = r0.v;
        r3 = r3.get(r2);
        r3 = (java.lang.Integer) r3;
        r3 = r3.intValue();
        if (r15 <= r3) goto L_0x0130;
    L_0x0129:
        r7 = r7 + 1;
        r2 = r2 + 1;
        r3 = r20;
        goto L_0x0117;
    L_0x0130:
        r2 = r0.u;
        r2.add(r7, r6);
        r2 = r0.v;
        r3 = java.lang.Integer.valueOf(r15);
        r2.add(r7, r3);
        goto L_0x0143;
    L_0x013f:
        r18 = r2;
        r19 = r7;
    L_0x0143:
        r14 = r14 + 1;
        r2 = r18;
        r7 = r19;
        r3 = 2;
        r6 = 0;
        goto L_0x00b1;
    L_0x014d:
        r2 = r0.u;
        r3 = r2.size();
        if (r3 != 0) goto L_0x0156;
    L_0x0155:
        return;
    L_0x0156:
        r3 = r0.m;
        java.util.Objects.requireNonNull(r3);
        r3 = r1.a;
        r3 = r3.getWidth();
        r3 = r3 + r4;
        r6 = r1.a;
        r6 = r6.getHeight();
        r6 = r6 + r5;
        r7 = r1.a;
        r7 = r7.getLeft();
        r7 = r4 - r7;
        r8 = r1.a;
        r8 = r8.getTop();
        r8 = r5 - r8;
        r9 = r2.size();
        r10 = 0;
        r11 = -1;
        r11 = r10;
        r10 = 0;
        r12 = -1;
    L_0x0182:
        if (r10 >= r9) goto L_0x0219;
    L_0x0184:
        r13 = r2.get(r10);
        r13 = (androidx.recyclerview.widget.RecyclerView.z) r13;
        if (r7 <= 0) goto L_0x01ae;
    L_0x018c:
        r14 = r13.a;
        r14 = r14.getRight();
        r14 = r14 - r3;
        if (r14 >= 0) goto L_0x01ae;
    L_0x0195:
        r15 = r13.a;
        r15 = r15.getRight();
        r16 = r2;
        r2 = r1.a;
        r2 = r2.getRight();
        if (r15 <= r2) goto L_0x01b0;
    L_0x01a5:
        r2 = java.lang.Math.abs(r14);
        if (r2 <= r12) goto L_0x01b0;
    L_0x01ab:
        r12 = r2;
        r11 = r13;
        goto L_0x01b0;
    L_0x01ae:
        r16 = r2;
    L_0x01b0:
        if (r7 >= 0) goto L_0x01d1;
    L_0x01b2:
        r2 = r13.a;
        r2 = r2.getLeft();
        r2 = r2 - r4;
        if (r2 <= 0) goto L_0x01d1;
    L_0x01bb:
        r14 = r13.a;
        r14 = r14.getLeft();
        r15 = r1.a;
        r15 = r15.getLeft();
        if (r14 >= r15) goto L_0x01d1;
    L_0x01c9:
        r2 = java.lang.Math.abs(r2);
        if (r2 <= r12) goto L_0x01d1;
    L_0x01cf:
        r12 = r2;
        r11 = r13;
    L_0x01d1:
        if (r8 >= 0) goto L_0x01f2;
    L_0x01d3:
        r2 = r13.a;
        r2 = r2.getTop();
        r2 = r2 - r5;
        if (r2 <= 0) goto L_0x01f2;
    L_0x01dc:
        r14 = r13.a;
        r14 = r14.getTop();
        r15 = r1.a;
        r15 = r15.getTop();
        if (r14 >= r15) goto L_0x01f2;
    L_0x01ea:
        r2 = java.lang.Math.abs(r2);
        if (r2 <= r12) goto L_0x01f2;
    L_0x01f0:
        r12 = r2;
        r11 = r13;
    L_0x01f2:
        if (r8 <= 0) goto L_0x0213;
    L_0x01f4:
        r2 = r13.a;
        r2 = r2.getBottom();
        r2 = r2 - r6;
        if (r2 >= 0) goto L_0x0213;
    L_0x01fd:
        r14 = r13.a;
        r14 = r14.getBottom();
        r15 = r1.a;
        r15 = r15.getBottom();
        if (r14 <= r15) goto L_0x0213;
    L_0x020b:
        r2 = java.lang.Math.abs(r2);
        if (r2 <= r12) goto L_0x0213;
    L_0x0211:
        r12 = r2;
        r11 = r13;
    L_0x0213:
        r10 = r10 + 1;
        r2 = r16;
        goto L_0x0182;
    L_0x0219:
        if (r11 != 0) goto L_0x0226;
    L_0x021b:
        r1 = r0.u;
        r1.clear();
        r1 = r0.v;
        r1.clear();
        return;
    L_0x0226:
        r2 = r11.e();
        r22.e();
        r3 = r0.m;
        r6 = r0.r;
        r3 = (c.h.a.n0.i.a) r3;
        r7 = 1;
        r3.d = r7;
        r7 = r22.e();
        r8 = r11.e();
        if (r7 >= r8) goto L_0x024c;
    L_0x0240:
        r9 = r7;
    L_0x0241:
        if (r9 >= r8) goto L_0x0258;
    L_0x0243:
        r10 = r3.e;
        r12 = r9 + 1;
        java.util.Collections.swap(r10, r9, r12);
        r9 = r12;
        goto L_0x0241;
    L_0x024c:
        r9 = r7;
    L_0x024d:
        if (r9 <= r8) goto L_0x0258;
    L_0x024f:
        r10 = r3.e;
        r12 = r9 + -1;
        java.util.Collections.swap(r10, r9, r12);
        r9 = r12;
        goto L_0x024d;
    L_0x0258:
        r3 = r6.getAdapter();
        if (r3 == 0) goto L_0x0263;
    L_0x025e:
        r3 = r3.a;
        r3.c(r7, r8);
    L_0x0263:
        r3 = r0.m;
        r6 = r0.r;
        java.util.Objects.requireNonNull(r3);
        r3 = r6.getLayoutManager();
        r7 = r3 instanceof b.p.b.q.g;
        if (r7 == 0) goto L_0x027c;
    L_0x0272:
        r3 = (b.p.b.q.g) r3;
        r1 = r1.a;
        r2 = r11.a;
        r3.b(r1, r2, r4, r5);
        goto L_0x02ce;
    L_0x027c:
        r1 = r3.g();
        if (r1 == 0) goto L_0x02a5;
    L_0x0282:
        r1 = r11.a;
        r1 = r3.F(r1);
        r4 = r6.getPaddingLeft();
        if (r1 > r4) goto L_0x0291;
    L_0x028e:
        r6.k0(r2);
    L_0x0291:
        r1 = r11.a;
        r1 = r3.I(r1);
        r4 = r6.getWidth();
        r5 = r6.getPaddingRight();
        r4 = r4 - r5;
        if (r1 < r4) goto L_0x02a5;
    L_0x02a2:
        r6.k0(r2);
    L_0x02a5:
        r1 = r3.h();
        if (r1 == 0) goto L_0x02ce;
    L_0x02ab:
        r1 = r11.a;
        r1 = r3.J(r1);
        r4 = r6.getPaddingTop();
        if (r1 > r4) goto L_0x02ba;
    L_0x02b7:
        r6.k0(r2);
    L_0x02ba:
        r1 = r11.a;
        r1 = r3.D(r1);
        r3 = r6.getHeight();
        r4 = r6.getPaddingBottom();
        r3 = r3 - r4;
        if (r1 < r3) goto L_0x02ce;
    L_0x02cb:
        r6.k0(r2);
    L_0x02ce:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.p.b.q.p(androidx.recyclerview.widget.RecyclerView$z):void");
    }

    public void q(View view) {
        if (view == this.w) {
            this.w = null;
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:80:0x01b7  */
    /* JADX WARNING: Removed duplicated region for block: B:86:0x01cb  */
    /* JADX WARNING: Removed duplicated region for block: B:85:0x01c1  */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x01d7  */
    /* JADX WARNING: Missing block: B:29:0x0095, code skipped:
            if (r1 > 0) goto L_0x00b6;
     */
    public void r(androidx.recyclerview.widget.RecyclerView.z r22, int r23) {
        /*
        r21 = this;
        r11 = r21;
        r12 = r22;
        r13 = r23;
        r0 = r11.c;
        if (r12 != r0) goto L_0x000f;
    L_0x000a:
        r0 = r11.n;
        if (r13 != r0) goto L_0x000f;
    L_0x000e:
        return;
    L_0x000f:
        r0 = -9223372036854775808;
        r11.C = r0;
        r4 = r11.n;
        r14 = 1;
        r11.l(r12, r14);
        r11.n = r13;
        r15 = 2;
        if (r13 != r15) goto L_0x002d;
    L_0x001e:
        if (r12 == 0) goto L_0x0025;
    L_0x0020:
        r0 = r12.a;
        r11.w = r0;
        goto L_0x002d;
    L_0x0025:
        r0 = new java.lang.IllegalArgumentException;
        r1 = "Must pass a ViewHolder when dragging";
        r0.<init>(r1);
        throw r0;
    L_0x002d:
        r0 = r13 * 8;
        r10 = 8;
        r0 = r0 + r10;
        r0 = r14 << r0;
        r16 = r0 + -1;
        r9 = r11.c;
        r8 = 0;
        if (r9 == 0) goto L_0x0178;
    L_0x003b:
        r0 = r9.a;
        r0 = r0.getParent();
        r7 = 0;
        if (r0 == 0) goto L_0x0164;
    L_0x0044:
        if (r4 != r15) goto L_0x0049;
    L_0x0046:
        r6 = 0;
        goto L_0x00b7;
    L_0x0049:
        r0 = r11.n;
        if (r0 != r15) goto L_0x004e;
    L_0x004d:
        goto L_0x00b5;
    L_0x004e:
        r0 = r11.m;
        java.util.Objects.requireNonNull(r0);
        r0 = 196611; // 0x30003 float:2.7551E-40 double:9.71387E-319;
        r1 = r11.m;
        r2 = r11.r;
        r3 = b.i.k.o.a;
        r2 = r2.getLayoutDirection();
        r0 = r1.b(r0, r2);
        r1 = 65280; // 0xff00 float:9.1477E-41 double:3.22526E-319;
        r0 = r0 & r1;
        r0 = r0 >> r10;
        if (r0 != 0) goto L_0x006c;
    L_0x006b:
        goto L_0x00b5;
    L_0x006c:
        r1 = r11.h;
        r1 = java.lang.Math.abs(r1);
        r2 = r11.i;
        r2 = java.lang.Math.abs(r2);
        r1 = (r1 > r2 ? 1 : (r1 == r2 ? 0 : -1));
        if (r1 <= 0) goto L_0x0098;
    L_0x007c:
        r1 = r11.i(r9, r0);
        if (r1 <= 0) goto L_0x0091;
    L_0x0082:
        r0 = r1 & 0;
        if (r0 != 0) goto L_0x00b6;
    L_0x0086:
        r0 = r11.r;
        r0 = r0.getLayoutDirection();
        r1 = b.p.b.q.d.c(r1, r0);
        goto L_0x00b6;
    L_0x0091:
        r1 = r11.k(r9, r0);
        if (r1 <= 0) goto L_0x00b5;
    L_0x0097:
        goto L_0x00b6;
    L_0x0098:
        r1 = r11.k(r9, r0);
        if (r1 <= 0) goto L_0x009f;
    L_0x009e:
        goto L_0x00b6;
    L_0x009f:
        r0 = r11.i(r9, r0);
        if (r0 <= 0) goto L_0x00b5;
    L_0x00a5:
        r1 = r0 & 0;
        if (r1 != 0) goto L_0x00b3;
    L_0x00a9:
        r1 = r11.r;
        r1 = r1.getLayoutDirection();
        r0 = b.p.b.q.d.c(r0, r1);
    L_0x00b3:
        r1 = r0;
        goto L_0x00b6;
    L_0x00b5:
        r1 = 0;
    L_0x00b6:
        r6 = r1;
    L_0x00b7:
        r0 = r11.t;
        if (r0 == 0) goto L_0x00c0;
    L_0x00bb:
        r0.recycle();
        r11.t = r7;
    L_0x00c0:
        r0 = 4;
        r1 = 0;
        if (r6 == r14) goto L_0x00e8;
    L_0x00c4:
        if (r6 == r15) goto L_0x00e8;
    L_0x00c6:
        if (r6 == r0) goto L_0x00d4;
    L_0x00c8:
        if (r6 == r10) goto L_0x00d4;
    L_0x00ca:
        r2 = 16;
        if (r6 == r2) goto L_0x00d4;
    L_0x00ce:
        r2 = 32;
        if (r6 == r2) goto L_0x00d4;
    L_0x00d2:
        r2 = 0;
        goto L_0x00e3;
    L_0x00d4:
        r2 = r11.h;
        r2 = java.lang.Math.signum(r2);
        r3 = r11.r;
        r3 = r3.getWidth();
        r3 = (float) r3;
        r2 = r2 * r3;
    L_0x00e3:
        r17 = r2;
        r18 = 0;
        goto L_0x00fb;
    L_0x00e8:
        r2 = r11.i;
        r2 = java.lang.Math.signum(r2);
        r3 = r11.r;
        r3 = r3.getHeight();
        r3 = (float) r3;
        r2 = r2 * r3;
        r18 = r2;
        r17 = 0;
    L_0x00fb:
        if (r4 != r15) goto L_0x0100;
    L_0x00fd:
        r5 = 8;
        goto L_0x0105;
    L_0x0100:
        if (r6 <= 0) goto L_0x0104;
    L_0x0102:
        r5 = 2;
        goto L_0x0105;
    L_0x0104:
        r5 = 4;
    L_0x0105:
        r0 = r11.b;
        r11.n(r0);
        r0 = r11.b;
        r19 = r0[r8];
        r20 = r0[r14];
        r3 = new b.p.b.q$c;
        r0 = r3;
        r1 = r21;
        r2 = r9;
        r14 = r3;
        r3 = r5;
        r15 = r5;
        r5 = r19;
        r19 = r6;
        r6 = r20;
        r13 = r7;
        r7 = r17;
        r13 = 0;
        r8 = r18;
        r18 = r9;
        r9 = r19;
        r13 = 8;
        r10 = r18;
        r0.m5128init(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
        r0 = r11.m;
        r1 = r11.r;
        java.util.Objects.requireNonNull(r0);
        r0 = r1.getItemAnimator();
        if (r0 != 0) goto L_0x0145;
    L_0x013d:
        if (r15 != r13) goto L_0x0142;
    L_0x013f:
        r0 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;
        goto L_0x014c;
    L_0x0142:
        r0 = 250; // 0xfa float:3.5E-43 double:1.235E-321;
        goto L_0x014c;
    L_0x0145:
        if (r15 != r13) goto L_0x014a;
    L_0x0147:
        r0 = r0.e;
        goto L_0x014c;
    L_0x014a:
        r0 = r0.d;
    L_0x014c:
        r2 = r14.g;
        r2.setDuration(r0);
        r0 = r11.p;
        r0.add(r14);
        r0 = r14.e;
        r1 = 0;
        r0.t(r1);
        r0 = r14.g;
        r0.start();
        r0 = 0;
        r8 = 1;
        goto L_0x0175;
    L_0x0164:
        r0 = r9;
        r13 = 8;
        r1 = r0.a;
        r11.q(r1);
        r1 = r11.m;
        r2 = r11.r;
        r1.a(r2, r0);
        r0 = 0;
        r8 = 0;
    L_0x0175:
        r11.c = r0;
        goto L_0x017b;
    L_0x0178:
        r13 = 8;
        r8 = 0;
    L_0x017b:
        if (r12 == 0) goto L_0x01ae;
    L_0x017d:
        r0 = r11.m;
        r1 = r11.r;
        r0 = r0.d(r1, r12);
        r0 = r0 & r16;
        r1 = r11.n;
        r1 = r1 * 8;
        r0 = r0 >> r1;
        r11.o = r0;
        r0 = r12.a;
        r0 = r0.getLeft();
        r0 = (float) r0;
        r11.j = r0;
        r0 = r12.a;
        r0 = r0.getTop();
        r0 = (float) r0;
        r11.k = r0;
        r11.c = r12;
        r0 = r23;
        r1 = 2;
        if (r0 != r1) goto L_0x01ae;
    L_0x01a7:
        r0 = r12.a;
        r1 = 0;
        r0.performHapticFeedback(r1);
        goto L_0x01af;
    L_0x01ae:
        r1 = 0;
    L_0x01af:
        r0 = r11.r;
        r0 = r0.getParent();
        if (r0 == 0) goto L_0x01bf;
    L_0x01b7:
        r2 = r11.c;
        if (r2 == 0) goto L_0x01bc;
    L_0x01bb:
        r1 = 1;
    L_0x01bc:
        r0.requestDisallowInterceptTouchEvent(r1);
    L_0x01bf:
        if (r8 != 0) goto L_0x01cb;
    L_0x01c1:
        r0 = r11.r;
        r0 = r0.getLayoutManager();
        r1 = 1;
        r0.h = r1;
        goto L_0x01cc;
    L_0x01cb:
        r1 = 1;
    L_0x01cc:
        r0 = r11.m;
        r2 = r11.c;
        r0 = (c.h.a.n0.i.a) r0;
        java.util.Objects.requireNonNull(r0);
        if (r2 == 0) goto L_0x01dc;
    L_0x01d7:
        r0 = r2.a;
        r0.setPressed(r1);
    L_0x01dc:
        r0 = r11.r;
        r0.invalidate();
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.p.b.q.r(androidx.recyclerview.widget.RecyclerView$z, int):void");
    }

    public void s(MotionEvent motionEvent, int i, int i2) {
        float x = motionEvent.getX(i2);
        float y = motionEvent.getY(i2);
        x -= this.d;
        this.h = x;
        this.i = y - this.e;
        if ((i & 4) == 0) {
            this.h = Math.max(0.0f, x);
        }
        if ((i & 8) == 0) {
            this.h = Math.min(0.0f, this.h);
        }
        if ((i & 1) == 0) {
            this.i = Math.max(0.0f, this.i);
        }
        if ((i & 2) == 0) {
            this.i = Math.min(0.0f, this.i);
        }
    }
}
